package com.itheima.exception;

/**
 * ClassName:GobalException
 * Package:com.itheima.exception
 * Description:
 *
 * @Author 老大
 * @Create 2024/5/8 15:58
 * @Version 1.0
 */

import com.itheima.pojo.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class GlobalException {
    @ExceptionHandler(Exception.class)
    public Result ex(Exception ex){     
        ex.printStackTrace();
        return Result.error("系统繁忙, 请稍后重试 ... ");
    }
}
